<?php

class DateOtpuskValidator extends sfValidatorBase
{
  protected function configure($options = array(), $messages = array())
  {
    parent::configure($options, $messages);

    // your validator configuration here
  }

  protected function doClean($value)
  {
    // Your validator logic here
    if ('toto' !== $value)
    {
      throw new sfException('My exception message');
    }

    return $value;
  }
}
?>
